import time
from selenium import webdriver
from selenium.webdriver import Keys
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
kw = driver.find_element(By.ID, "kw")
kw.send_keys("天气预报")
kw.send_keys(Keys.CONTROL, "a")
kw.send_keys(Keys.CONTROL, "c")
driver.get("https://www.sogou.com")
que = driver.find_element(By.ID, "query")
que.send_keys(Keys.CONTROL, "v")
driver.find_element(By.ID, "stb").click()
time.sleep(3)
driver.quit()